

package cn.shengchao.examstar.teacher.acl.ports.message;

import cn.shengchao.examstar.teacher.infrastructure.dao.po.TTeacher;
import lombok.Data;

@Data
public class TeacherInfo {
    private Long id;
    private String name;
    private String headUrl;
    private String details;
    private Long userId;

    public static TeacherInfo of(TTeacher teacher) {
        TeacherInfo teacherInfo = new TeacherInfo();
        teacherInfo.setId(teacher.getId());
        teacherInfo.setName(teacher.getName());
        teacherInfo.setHeadUrl(teacher.getHeadUrl());
        teacherInfo.setDetails(teacher.getDetails());
        teacherInfo.setUserId(teacher.getUserId());
        return teacherInfo;
    }
}
